package ys.demo1.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
@RequestMapping("/view")
public class ViewController {

    @GetMapping("/index")
    public String index(HttpServletRequest request){
        request.setAttribute("hello","这是一个测试页");
        return "index";
    }
}
